package com.rmb.client;

import com.rmb.annotation.SystemLog;
import com.rmb.enums.LogType;
import com.rmb.fremarker.client.RmbServiceFeign;
import com.rmb.service.impl.SourseHystrixImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @version 1.0
 * @Author ZhaoMuYang
 * @Date 2021/1/13 19:56
 */
@FeignClient(value = RmbServiceFeign.DATA_ANALYSIS,fallback = SourseHystrixImpl.class)
public interface DataAnalysisClient {


    /**
     * BI记录
     * @param executeSql 执行sql语句
     * @param executeResult 执行结果
     * @param dataSourceId 数据源ID
     * @param dataBaseName 数据库名称
     * @param tableName 表名称
     */
    @GetMapping("/rmb/analysis/addAnalysis")
    @SystemLog(description = "Bi记录",type = LogType.SELETE)
    void addAnalysis(@RequestParam("executeSql")String executeSql,
                     @RequestParam("executeResult")String executeResult,
                     @RequestParam("dataDataSourceId")Long dataSourceId,
                     @RequestParam("dataBaseName")String dataBaseName,
                     @RequestParam("tableName")String tableName);

}
